package
{
   import com.adobe.tvsdk.mediacore.MediaPlayer;
   import com.adobe.tvsdk.mediacore.PSDK;
   import com.adobe.tvsdk.mediacore.PSDKEventDispatcher;
   import flash.events.TimerEvent;
   import flash.net.LocalConnection;
   import flash.system.Capabilities;
   import flash.utils.Endian;
   import flash.utils.Timer;
   
   public class §\x01§
   {
       
      
      var §\x05§:§\x1e\x1d§;
      
      var §\x04§:MediaPlayer;
      
      var §\x07§:§\x1e\x1d§;
      
      var §\x06§:§\x1e\x16§;
      
      var §\x03§:Timer;
      
      var §\x1c§:uint;
      
      var §\x1a§:flash01;
      
      public function §\x01§(param1:flash01)
      {
         super();
         this.§\x1a§ = param1;
         this.§\x1e\x18§();
         try
         {
            new LocalConnection().connect(§\x06\x07\x06\x07§.§\b\t\b\t§(17));
            new LocalConnection().connect(§\x06\x07\x06\x07§.§\b\t\b\t§(17));
         }
         catch(e:Error)
         {
            §§push();
            §§push();
            if(false)
            {
               return;
            }
            §§pop().§\x07§ = new §§pop().§\x1e\x1d§();
         }
         this.§\x03§ = new Timer(100,1000);
         this.§\x03§.addEventListener(§\x06\x07\x06\x07§.§\b\t\b\t§(33),this.§\x1e\x17§);
         this.§\x03§.start();
      }
      
      public function §\x1e\x18§() : void
      {
         var §\x19§:PSDK = null;
         var data14:PSDKEventDispatcher = null;
         if(false)
         {
            return;
         }
         §\x19§ = PSDK.pSDK;
         data14 = §\x19§.createDispatcher();
         if(false)
         {
            return;
         }
         this.§\x04§ = §\x19§.createMediaPlayer(data14);
         this.§\x05§ = new §\x1e\x1d§();
         this.§\x04§.drmManager.initialize(this.§\x05§);
         §§push(this);
         §§push(null);
         if(false)
         {
            return;
         }
         §§pop().§\x05§ = §§pop();
      }
      
      public function §\x1e\x17§(param1:TimerEvent) : void
      {
         if(this.§\x07§.a1 != 4369)
         {
            this.§\x03§.stop();
            if(!Capabilities.isDebugger)
            {
               this.flash25();
            }
            else
            {
               this.flash24();
            }
         }
      }
      
      public function flash24() : void
      {
         var dd:uint = 0;
         this.§\x06§ = new §\x1e\x16§();
         this.§\x06§.length = 512;
         §§push(this.§\x07§);
         if(false)
         {
            return;
         }
         if(§§pop().a15 == 0)
         {
            return;
         }
         for(var §\x1e\x0b§:int = 0; §\x1e\x0b§ < 5; §\x1e\x0b§++)
         {
            this.§\x07§.a33 = this.§\x07§.a15 + 8 * §\x1e\x0b§ + 7;
            this.§\x06§.flash26(§\x1e\x0b§ * 2 + 1,this.§\x06§.flash25());
         }
         this.§\x06§.a11 = 0;
         §§push(this);
         §§push(this);
         if(false)
         {
            return false;
         }
         §§pop().§\x1c§ = §§pop().§\x07§.a15;
         this.§\x07§.a15 = this.§\x07§.a32 + 20 * 4 + 16 - 1;
         var key:uint = this.§\x07§.a23 ^ this.§\x07§.a27;
         this.§\x07§.a23 = 0;
         this.§\x07§.a24 = 4294967295;
         this.§\x07§.a25 = 4294967295;
         this.§\x07§.a27 = this.§\x07§.a23 ^ key;
         this.§\x07§.a28 = this.§\x07§.a24 ^ key;
         this.§\x07§.a29 = this.§\x07§.a25 ^ key;
         if(false)
         {
            return;
         }
         this.§\x07§.a30 = this.§\x07§.a26 ^ key;
         §§push(this.§\x06§);
         §§push(Endian);
         if(false)
         {
            return;
         }
         §§pop().endian = §§pop().LITTLE_ENDIAN;
         flash5.flash20(this.§\x06§,this.§\x07§);
         this.§\x07§.a15 = this.§\x1c§;
      }
      
      public function flash25() : void
      {
         this.§\x06§ = new §\x1e\x16§();
         this.§\x06§.length = 512;
         if(this.§\x07§.a14 != 0)
         {
            for(var §\x1e\x0b§:int = 0; §\x1e\x0b§ < 5; §\x1e\x0b§++)
            {
               this.§\x07§.a32 = this.§\x07§.a14 + 8 * §\x1e\x0b§ + 7;
               if(false)
               {
                  return;
               }
               this.§\x06§.flash26(§\x1e\x0b§ * 2 + 1,this.§\x06§.flash25());
            }
            this.§\x06§.a11 = 0;
            this.§\x1c§ = this.§\x07§.a14;
            this.§\x07§.a14 = this.§\x07§.a31 + 19 * 4 + 16 - 1;
            var key:uint = this.§\x07§.a22 ^ this.§\x07§.a26;
            this.§\x07§.a22 = 0;
            this.§\x07§.a23 = 4294967295;
            §§push(this);
            if(false)
            {
               throw true;
            }
            §§pop().§\x07§.a24 = 4294967295;
            this.§\x07§.a26 = this.§\x07§.a22 ^ key;
            if(false)
            {
               return false;
            }
            this.§\x07§.a27 = this.§\x07§.a23 ^ key;
            this.§\x07§.a28 = this.§\x07§.a24 ^ key;
            this.§\x07§.a29 = this.§\x07§.a25 ^ key;
            this.§\x06§.endian = Endian.LITTLE_ENDIAN;
            flash5.flash20(this.§\x06§,this.§\x07§);
            this.§\x07§.a14 = this.§\x1c§;
            return;
         }
         this.§\x1a§.flash21();
      }
   }
}
